package com.guoyw.rabbitmq.rabbitmq.consumer.basics;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Description: TODO
 * @Author: guoyw
 * @CreateDate: 2021/3/20 8:41 下午
 * @Version: 1.0
 * @Copyright COPYRIGHT © 2021 言津信息.沪ICP备18011820号.
 */
@Component
@Slf4j
public class Consumer {

  @RabbitListener(queues = RabbitmqConfig.QUEUE_NAME)
  public void BasicsConsumer(Message message) {
      log.info("basics msg:{}",message.getBody());
  }


}
